home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tclX-6.4 / help / control / if < prev    next >
Encoding:
Text File  |  1992-12-17  |  956 b   |  15 lines

  1.           if test ?then? trueBody ?else? ?falseBody?
  2.                The if command evaluates test as an expression (in  the
  3.                same  way that expr evaluates its argument).  The value
  4.                of the expression must be numeric; if  it  is  non-zero
  5.                then  trueBody  is  called  by  passing  it  to the Tcl
  6.                interpreter.   Otherwise  falseBody  is   executed   by
  7.                passing  it  to the Tcl interpreter.  The then and else
  8.                arguments are optional  ``noise  words''  to  make  the
  9.                command easier to read.  FalseBody is also optional; if
  10.                it isn't specified then the  command  does  nothing  if
  11.                test  evaluates  to  zero.  The return value from if is
  12.                the value of the last command executed in  trueBody  or
  13.                falseBody,  or  the  empty  string if test evaluates to
  14.                zero and falseBody isn't specified.
  15.